package com.sg.dto.integration.pbff.common;

import com.sg.common.annotations.TreeType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;


/**
 * @desc BffConfClassItemDto
 * @使用场景
 */
@Data
public class BffConfClassItemDto implements Serializable {

    /**
     * 配置项ID
     */
    @NotNull(message = "配置项ID不能为空")
    @ApiModelProperty("配置项ID")
    @TreeType("id")
    private String confItemId;

    /**
     * 配置项标识
     */
    @NotNull(message = "配置项标识不能为空")
    @ApiModelProperty("配置项标识")
    private String confItemCode;

    /**
     * 所属配置项分组ID
     */
    @NotNull(message = "所属配置项分组ID不能为空")
    @ApiModelProperty("所属配置项分组ID")
    private String confItemClassId;

    /**
     * 所属配置项分组标识
     */
    @NotNull(message = "所属配置项分组标识不能为空")
    @ApiModelProperty("所属配置项分组标识")
    private String confItemClassCode;

    /**
     * 所属配置方案ID
     */
    @NotNull(message = "所属配置方案ID不能为空")
    @ApiModelProperty("所属配置方案ID")
    private String confSchemeId;

    /**
     * 所属配置方案标识
     */
    @NotNull(message = "所属配置方案标识不能为空")
    @ApiModelProperty("所属配置方案标识")
    private String confSchemeCode;
    /**
     * 分组配置项ID
     */
    @ApiModelProperty("分组配置项ID")
    private String classConfItem;

    /**
     * 配置项简称
     */
    @ApiModelProperty("配置项简称")
    private String shortName;

    /**
     * 选项类型 RADIO:单选型 MULTIPLE:多选型 TEXT:填空型
     */
    @ApiModelProperty("选项类型")
    private String confItemCategory;

    /**
     * 是否开关 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否开关")
    private String isSwitch;

    /**
     * 是否单一结果 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否单一结果")
    private String isSingleResult;

    /**
     * 结果是否允许二次设置 TRUE:是 FALSE:否
     */
    @ApiModelProperty("结果是否允许二次设置")
    private String isAllowUpdateAnswer;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Long orderNumber;
    /**
     * 分组配置项ID
     */
    @ApiModelProperty("分组配置项ID")
    private String classConfItemId;
    /**
     * 生命周期状态 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @ApiModelProperty("生命周期状态")
    private String subjectLifeCycle;
    /**
     * 是否用户可见 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否用户可见")
    private String isVisible;

    /**
     * 是否开启自定义配置 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否开启自定义配置")
    private String isOpenCustomConf;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BffConfClassItemDto that = (BffConfClassItemDto) o;
        return confItemId == that.confItemId && confItemCode == that.confItemCode && confItemClassId == that.confItemClassId && confItemClassCode == that.confItemClassCode && confSchemeId == that.confSchemeId && confSchemeCode == that.confSchemeCode && classConfItem == that.classConfItem && shortName == that.shortName && confItemCategory == that.confItemCategory && isSwitch == that.isSwitch && isSingleResult == that.isSingleResult && isAllowUpdateAnswer == that.isAllowUpdateAnswer && orderNumber == that.orderNumber && classConfItemId == that.classConfItemId && subjectLifeCycle == that.subjectLifeCycle && isVisible == that.isVisible && isOpenCustomConf == that.isOpenCustomConf;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), confItemId, confItemCode, confItemClassId, confItemClassCode, confSchemeId, confSchemeCode, classConfItem, shortName, confItemCategory, isSwitch, isSingleResult, isAllowUpdateAnswer, orderNumber, classConfItemId, subjectLifeCycle, isVisible, isOpenCustomConf);
    }


}
   